<template>
  <div class="btn-wrapper">
    <div class="btn" @click="handleSubmit">
      <div class="desc">{{ desc }}</div>
      <van-loading v-if="logining" color="#ffffff"/>
    </div>
  </div>
</template>

<script>
export default {
  name: 'CommonBtn',
  props: {
    desc: {
      type: String,
      default: '登录'
    },
    logining: {
      type: Boolean,
      default: false
    }
  },
  data () {
    return {
    }
  },
  created () {
  },
  methods: {
    handleSubmit () {
      this.$emit('submit')
    }
  }
}
</script>

<style lang="stylus" scoped>
@import '~stylus/mixins.styl'
@import '~stylus/variable.styl'

.btn-wrapper
  width 100%

  .btn
    background-color $primary
    display flex
    justify-content center
    align-items center
    color $btn_font_color
    width 100%
    height 88px
    border-radius 44px
    font-size $btn_size
    .desc
      margin-right 10px
</style>
